package com.shop.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shop.entity.dto.AdminCost.AdminCostListDto;
import com.shop.entity.dto.AdminStyle.AdminStyleCostDto;
import com.shop.entity.pojo.Cost;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CostMapper extends BaseMapper<Cost> {
    Page<Cost> getByWaresId(@Param("page") Page<Cost> page, @Param("waresId") Long waresId);
    Page<Cost> getByStyleId(@Param("page") Page<Cost> page,@Param("styleId")Long styleId);

    Page<Cost> getAllByPage(@Param("page") Page<Cost> page,@Param("dto") AdminCostListDto dto);

    Page<Cost> CostPageByStyleId(@Param("page") Page<Cost> page,@Param("dto") AdminStyleCostDto dto);

    List<Cost> getList(@Param("cost") Cost cost);

    Cost getOne(@Param("id")Long id);

    boolean updateIsDelete(@Param("cost") Cost cost);
}
